package com.wfcm.service.impl;

import com.wfcm.dao.WfNewMessageDao;
import com.wfcm.entity.WfNewMessageEntity;
import com.wfcm.service.WfNewMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class WfNewMessageServiceImpl implements WfNewMessageService {

    @Autowired
    private WfNewMessageDao newMessageDao;

    @Override
    public Integer newFlag(Integer userId) {
        return newMessageDao.newFlag(userId);
    }

    @Override
    public Integer queryTotal(Integer userId) {
        return newMessageDao.queryTotal(userId);
    }

    @Override
    public Integer update(WfNewMessageEntity newMessageEntity) {
        return newMessageDao.update(newMessageEntity);
    }

    @Override
    public Integer delete(Integer id) {
        return newMessageDao.delete(id);
    }

    @Override
    public void save(WfNewMessageEntity newMessageEntity) { newMessageDao.save(newMessageEntity);
    }

    @Override
    public  List<WfNewMessageEntity> queryMessage(Map<String,Object> query){
        return newMessageDao.queryMessage(query);
    }
}
